package com.mkait.thief.controller;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mkait.thief.domain.Order;
import com.mkait.thief.domain.Thief;
import com.mkait.thief.service.OrderService;
import com.mkait.thief.service.ThiefService;
import jdk.nashorn.internal.runtime.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RequestMapping("/thief")
@RestController
@Transactional(rollbackFor = Exception.class)
public class ThiefController {

    @Autowired
    private ThiefService thiefService;


    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @GetMapping("/{trade_no}")
    public void thief(@PathVariable("trade_no") String tradeNo){
        thiefService.thiefTrade(tradeNo);
        return;
    }
}
